
'''
封装类视图---第二步：
告诉蓝图对象暂时接管的内容
'''
from heima_toutiao.apps.home import view,home_api
# 添加FRF的视图路由
home_api.add_resource(view.HomeResource,'/index')
# 获取所有频道路由
home_api.add_resource(view.AllChannerlsResource,'/channels')
# 获取用户关注频道路由
home_api.add_resource(view.UserChannelsResource,'/user/channels')
# 获取文章列表
home_api.add_resource(view.IndexResouce,'/articles')
# 文章详情页面
home_api.add_resource(view.DetailResouce,'/articles/<int:article_id>/')
# 点赞文章
home_api.add_resource(view.LikingResouce,'/article/likings')
# 取消点赞
home_api.add_resource(view.UnLikingResouce,'/article/likings/<int:target>')
# 不喜欢
home_api.add_resource(view.DisLikingResouce,'/article/dislikes')
# 取消不喜欢
home_api.add_resource(view.UnDisLikingResouce,'/article/dislikes/<int:target>')
# 收藏文章
home_api.add_resource(view.CollectionResource,'/article/collections')
# 取消收藏
home_api.add_resource(view.UnCollectionResource,'/article/collections/<int:target>')
# 发布评论---评论/回复评论---回复评论
home_api.add_resource(view.CommentResouce,'/comments')
# 评论或回复评论点赞
home_api.add_resource(view.CommentLikingResource,'/comment/likings')
# 取消点赞
home_api.add_resource(view.UnCommentLikingResource,'/comment/likings/<int:target>')